import request from '../utils/request'

// 健身计划相关API
export const planApi = {
  // 获取健身计划列表
  getPlanList: (params?: any) => {
    return request.get('/plans', { params })
  },

  // 获取健身计划详情
  getPlanDetail: (id: number) => {
    return request.get(`/plans/${id}`)
  },

  // 创建健身计划
  createPlan: (data: any) => {
    return request.post('/plans', data)
  },

  // 更新健身计划
  updatePlan: (id: number, data: any) => {
    return request.put(`/plans/${id}`, data)
  },

  // 删除健身计划
  deletePlan: (id: number) => {
    return request.delete(`/plans/${id}`)
  }
}